home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-06-15 | 2.1 KB | 48 lines | [TEXT/GEOL] |
- Item 7612379 9-June-90 21:33PDT
-
- From: D0416 Futuresoft System Design,PRT
-
- To: A.XSE010 Austria - SLT Labinstruments,IDV
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: RE-Cmd not disabled on close
-
- Alex,
-
- It seems no one yet has responded to your message about view-specific menu
- items not disabled when all views are closed in your application. Here’s a shot
- as to what I think may be wrong. Keep in mind that the first thing MacApp does
- before calling DoSetupMenus is to disable all menu items (commands) not under
- the Apple menu.
-
- First idea:
- Some TEventHandler (in the target chain) higher up than the views that are
- closed must be enabling the menu item (command). Normally, the only
- TEventHandler objects higher up the chain would be either a TDocument object or
- a TApplication object. Check and see if you are calling Enable(aViewCommand,
- TRUE) in TYourApp.DoSetupMenus and TYourDoc.DoSetupMenus methods. Usually, a
- TYourView specific command should ONLY be enabled/disabled in
- TYourView.DoSetupMenus.
-
- Second idea:
- Check in your TYourApp.DoSetupMenus and TYourDoc.DoSetupMenus to see if you are
- calling INHERITED DoSetupMenus. This is very important because this enables the
- mechanism that allows MacApp to traverse the target chain and call DoSetupMenus
- for each object in the chain. While your at it, you might also want to check
- for this in TYourView, if you are OVERRIDEing TView.DoSetupMenus.
-
- Hope that helps without adding more confusion,
- -Ken Addison
- FutureSoft System Designs, Inc.
-
- PS: You should call INHERITED DoSetupMenus _before_ you do your Enable's in
- order to give objects “higher” in the target chain the a chance to Enable
- commands _before_ the “lower” objects. This allows the lower objects to sort of
- override enabling a command MacApp may have enabled or disabled.
-
- But, for DoMouseCommand and DoKeyCommand you call INHERITED DoMouseCommand or
- DoKeyCommand _after_ you process the command and then only if the “current”
- object can’t handle the command.
-
-